<template>
  <div class="re">
    vue3常见的api练习

    <div class="mt30">
      <div class="fwb tac">v-model修饰符</div>
      <div>{{ url }}</div>
      <div><input type="text" v-model.lazy="url" placeholder="请输入网址" /></div>
      <div>这是自组件传过来的数值--{{ parentsData }}</div>
    </div>

    <div>
      <child @send-emits="getData" title="这是父组件给子组件传值123" />
    </div>

    <div>这是兄弟组件传值</div>
    
    <aHtml />
    <bHtml />

  </div>
</template>

<script setup>

import { ref } from 'vue';
import child from './Emits.vue';
import aHtml from '@/components/A.vue';
import bHtml from '@/components/B.vue';
const url = ref('');
const parentsData = ref();

const getData = (data) => {
  parentsData.value = data;
}

</script>

<style scoped>

</style>